package com.biz.primus.base.elasticsearch.util;

import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * Elastic 分页对象
 *
 * @author david-liu
 * @date 2017年01月06日
 * @reviewer
 * @see
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ElasticSearchResultPage implements Serializable {

    private static final long serialVersionUID = 6091890904439722054L;

    /**
     * 起始下标
     */
    private Integer from;

    /**
     * 获取页大小
     */
    private Integer size;


    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
